home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / gamma-bros.swf / scripts / __Packages / classes / fx / EnemySoul.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  891 b   |  37 lines

  1. class classes.fx.EnemySoul
  2. {
  3.    var id;
  4.    var x;
  5.    var y;
  6.    var color;
  7.    var clip;
  8.    var yMov;
  9.    var xMov = 0;
  10.    var speed = 4;
  11.    var Name = "enemySoul";
  12.    function EnemySoul(px, py, pcolor, pid)
  13.    {
  14.       this.id = pid;
  15.       this.x = px;
  16.       this.y = py;
  17.       this.color = pcolor;
  18.       _root.d = _root.d + 1;
  19.       this.clip = _root.attachMovie("enemySoul","enemySoul" + this.id + "Clip",_root.d);
  20.       this.clip._x = this.x;
  21.       this.clip._y = this.y;
  22.       var _loc3_ = random(2) + 1;
  23.       this.clip.gotoAndPlay(this.color + _loc3_);
  24.       this.yMov = -1 * _root.randRange2(1,3) * _loc3_;
  25.       this.clip._alpha = _root.randRange(35,65);
  26.    }
  27.    function main()
  28.    {
  29.       if(this.y < -5 || this.clip.end)
  30.       {
  31.          _root.removeFX("enemySoul" + this.id);
  32.       }
  33.       this.y += this.yMov;
  34.       this.clip._y = this.y;
  35.    }
  36. }
  37.